package  com.pcbly.web.business.calendar;

/**
* @author carl.song
* Copyright (c) 2010 Lightsoft, International.
* All rights reserved.
*
*/

import com.pcbly.web.persistence.calendar.CalendarEventDao;
import com.pcbly.web.bean.calendar.CalendarEventBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.components.hibernate.support.Page;

 
public class CalendarEventServiceImp extends BaseServiceImp<CalendarEventBean> implements CalendarEventService {
	 public CalendarEventServiceImp() {
		super();
		// TODO Auto-generated constructor stub
	}
	private CalendarEventDao calendarEventDao;
	
	public void setCalendarEventDao(CalendarEventDao calendarEventDao) {
		this.calendarEventDao = calendarEventDao;
	}
	
	@Override
	public CalendarEventBean getCalendarEventBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		return calendarEventDao.get(CalendarEventBean.class,id);
	}
	
	@Override
	public void removeCalendarEventBeanById(String id) throws Exception{
		calendarEventDao.removeCalendarEventBeanById(id);
	}
	
	@Override
	public void removeCalendarEventBeanByIds(String ids) throws Exception{
		calendarEventDao.removeCalendarEventBeanByIds(ids);
	}
	
	
	@Override
	public CalendarEventBean saveCalendarEventBean(CalendarEventBean calendar) throws Exception{
		return calendarEventDao.saveCalendarEventBean(calendar);
	}
	
	@Override
	public CalendarEventBean updateCalendarEventBean(CalendarEventBean calendar) throws Exception{
		calendarEventDao.saveObject( calendar);
		return calendar;
	}
	public Page<CalendarEventBean>  findCalendarEventBeanByCond(CalendarEventBean bean,
			Page<CalendarEventBean> page, String orderByName, boolean asc)
			throws Exception{
		return calendarEventDao.findCalendarEventBeanByCond(
				bean, page, orderByName, asc);
	}
}
